home *** CD-ROM | disk | FTP | other *** search
- Path: lrz-muenchen.de!news
- From: watzka@stat.uni-muenchen.de (Kurt Watzka)
- Newsgroups: comp.lang.c
- Subject: Re: void main() and other atrocities!
- Date: 6 Feb 1996 13:25:56 GMT
- Organization: Leibniz-Rechenzentrum, Muenchen (Germany)
- Distribution: world
- Message-ID: <4f7kt4$ltb@sparcserver.lrz-muenchen.de>
- References: <4eduaj$1aq@grouper.Exis.Net> <4em17r$shq@jaxnet.jaxnet.com> <4emub9$1mo@fountain.mindlink.net> <4epplj$egf@host-3.cyberhighway.net> <4erjn2INN38b@keats.ugrad.cs.ubc.ca> <9602021300.AA04359@dxmint.cern.ch> <4f5vc2$qcj@cdn_news.telecom.com.au>
- NNTP-Posting-Host: sun2.lrz-muenchen.de
-
- jolson@vprpmel1.telecom.com.au (Jeff Olson) writes:
-
- >How about:
-
- >int main (int argc, char **argv)
-
- >I saw in the FAQ that a multi-dimentional array will not decay into a pointer
- >to a pointer.
-
- This is true in the sense that an array of arrays will decay to a pointer
- to the first element, which happens to be an array. There is no special
- rule for arrays of arrays.
-
- >This main() is valid with my Sparcworks compiler so I would
- >like to know if my compiler is supporting non-standard behavior
-
- Yes, it is, but not in this case.
-
- >or if argv is
- >a pointer to an array of characters (meaning it can decay into a pointer to a
- >pointer).
-
- "argv" may well be an array of pointers to char, and you cannot tell
- the difference, but a pointer to an array will _not_ decay to a
- pointer to a pointer.
-
- Kurt
- --
- | Kurt Watzka Phone : +49-89-2180-6254
- | watzka@stat.uni-muenchen.de
- | ua302aa@sunmail.lrz-muenchen.de
-